package com.hyd.tweet.twitter.command;


import twitter4j.TwitterException;

import java.util.Arrays;
import java.util.List;

/**
 * (description)
 *
 * @author yiding.he
 */
public class UnfollowCommand extends Command {

    @Override
    public List<String> processCommand() throws TwitterException {
        if (arguments.isEmpty()) {
            return Arrays.asList("——没有指定用户。");
        }

        String screenName = arguments.get(0);

        twitter.destroyFriendship(screenName);
        return Arrays.asList("——您已经成功 unfo 了 " + screenName + "。");
    }
}
